visual basic, vb, active server pages, asp, DHTML, vbscript,java, javscript, c, c++, c__ , source, code, sample, samples, program, programs, routine, routines, source code, snippet, snippets, control, controls, class, classes, module
489,219 lines in Visual Basic World

The Basics
Search
Browse
Submit Code

Advanced
Newest Code
Top Code of Month
All-Time Top Code
Code of the Day
Coding Contest

Beyond the
Code

Discuss
Tutorials
Recommended
    Reading

Miscellaneous
Link to us
Feedback
About the Site
Awards
Advertising
World Home
Site Home
Other Sites

Switch Worlds
Java / Javascript World
C / C++ World
ASP / VbScript World

Latest Code Ticker
Click here to see a screenshot of this code! ActiveX Registrar
By FoxMcCloud on 4/3
(Screen Shot)

Trick
By F. W. on 4/3

Boolean Inversion
By AnonVBGuy on 4/3

Click here to see a screenshot of this code! Equipment_Labels
By Max L. Seim on 4/3
(Screen Shot)

Hide the Windows Taskbar
By Steve on 4/3

RSA.ocx
By Martin Vielsmaier on 4/3

Data Environment Example
By Thomas D. Tomlins on 4/3

WS.ocx
By Martin Vielsmaier on 4/3

Artificial Intelligence for your enemies
By Stephan Kirchmaier on 4/3

Click here to see a screenshot of this code! Image in Menu true API(Update!!!!)
By Roeland Kluit on 4/3
(Screen Shot)

Advanced Tic-Tac-Toe
By  on 4/3

REAL Tool Tips
By Wacko (ICQ#27117111) on 4/3

Change form backround with common dialog
By Wacko (ICQ#27117111) on 4/3

Have multiple passwords in one code
By Wacko (ICQ#27117111) on 4/3

Scrolling Credits
By Wacko (ICQ#27117111) on 4/3



Join AllAdvantage.com

Planet Source Code
Dream it.  Code it.
Visual Basic World: 489,219 lines of FREE code.
965 people are online.
 
Find Code:

Advanced Search
    Browse

 


   

   

!!!*!Make a cool EASY Lotto Game!*!!!\

VB icon

Submitted on: 8/6/1999
By: SeeD
Level: Not Given
User Rating: By 37 Users
Compatibility:VB 5.0/6.0, VB 4.0/32, VB 4.0/16, VB 3.0

Users have accessed this code 1525 times.
 
 
     MAKE AN EASY LOTTO GAME!!! ***UPDATED***
 

Other 26 submission(s) by this author

 

Source Code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!

			
'**************************************
' Name: !!!*!Make a cool EASY Lotto Game
'     !*!!!
' Description:MAKE AN EASY LOTTO GAME!!!
'     ***UPDATED***
' By: SeeD
'
'
' Inputs:You're going to need 3 Labels t
'     o start. You can add more once you get t
'     he hang of it. You also need 1 Command b
'     utton. Make it's caption "OK", and the L
'     abels captions blank. Follow the simple 
'     instructions below.
'
' Returns:none
'
'Assumes:You can alter this code to your
'     convienience. Here are some nifty things
'     you could change:
You could use text boxes instead of labels. You would have To change every "Label1.Caption" to "Text1.Text" and so on.

You can add as many more text boxes or labels as you'd like, as Long as you adjust the code accrodingly.
If your smart enough, you could make it a simple password entry screen, but you'd have To Do some easy Error handling and you'd have to use text boxes instead of labels.
If your smart enough, you could make a simple lotto game to share With your friends and family. - SeeD (o:
'
'Side Effects:none
'
'Warranty:
'Code provided by Planet Source Code(tm)
'     (http://www.Planet-Source-Code.com) 'as 
'     is', without warranties as to performanc
'     e, fitness, merchantability,and any othe
'     r warranty (whether expressed or implied
'     ).
'Terms of Agreement:
'By using this source code, you agree to
'     the following terms...
' 1) You may use this source code in per
'     sonal projects and may compile it into a
'     n .exe/.dll/.ocx and distribute it in bi
'     nary format freely and with no charge.
' 2) You MAY NOT redistribute this sourc
'     e code (for example to a web site) witho
'     ut written permission from the original 
'     author.Failure to do so is a violation o
'     f copyright laws.
' 3) You may link to this code from anot
'     her website, provided it is not wrapped 
'     in a frame.
' 4) The author of this code may have re
'     tained certain additional copyright righ
'     ts.If so, this is indicated in the autho
'     r's description.
'**************************************



Private Sub Command1_Click()

    Label1.Caption = Int(rnd * 10)
    Label2.Caption = Int(rnd * 10)
    Label3.Caption = Int(rnd * 10)


    If (Label1.Caption = Label2.Caption) And (Label3.Caption = Label2.Caption) Then
        MsgBox "You Win!", 8, "Winner!"
    End If

End Sub

 
Your Vote!

What do you think of this code (in the Not Given category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
8/6/1999 1:33:00 PM: SeeD
there are no limits as of what you 
could do with an RNG (Random Number 
Generator)  Have Fun! (o:
Keep the Planet clean! If this comment was disrespectful, please click here.

 
9/16/1999 9:07:00 PM: Wolf
You have to seed the Rnd function with 
Randomize otherwise you get the same 
random numbers over and over. 
Keep the Planet clean! If this comment was disrespectful, please click here.

 
3/20/2000 9:41:48 PM: Burbble
yep, you have to put Randomize in it 
otherwise it will give the same 
(random) numbers each time the program 
runs. another (sad) program by what's 
his face...
Keep the Planet clean! If this comment was disrespectful, please click here.

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular piece of code, please click here.
 
Name:
Comment:

 

 

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved
By using this site you agree to its Terms and Conditions.
Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.